import java.util.Scanner;

public class Student1 {
    public static void main(String[] args) {
        Student st = new Student();
        Scanner input = new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            System.out.print("请输入学生姓名：");
            String newName = input.next();
            st.addName(newName);
        }
        st.showNames();
        System.out.print("请输入开始查找的位置");
        int s = input.nextInt();
        System.out.print("请输入结束查找的位置");
        int e = input.nextInt();
        System.out.print("请输入查找的姓名");
        String name = input.next();
        if (st.searchName(s, e, name)) {
            System.out.println("找到了");
        } else {
            System.out.println("查无此人");
        }
    }
}

